At first, I thought it did, but later I found out it doesn’t. Currently, Excel’s built-in Python supports twenty third-party Python packages.
Packages Supported by Excel’s Built-in Python
Excel’s built-in Python supports all of Python’s internal packages, such as the os package, which can be imported and used directly.
The third-party packages supported by Excel’s built-in Python are listed in Table 3-1. These include commonly used packages for data analysis such as pandas, Matplotlib, Seaborn, NumPy, the symbolic computation package SymPy, the scientific computing package SciPy, statsmodels, and the machine learning package scikit-learn, among others.
Table 3-1: Packages Supported by Excel’s Built-in Python
| Library Name | Description |
|---|---|
| astropy | A Python library for astronomy |
| beautifulsoup4 | A Python library for screen scraping |
| scikit-learn | A set of Python packages for machine learning and data mining (Note: appears twice in original list; likely a duplication) |
| ipython | A package for interactive computing |
| gensim | A topic modeling and natural language processing package |
| matplotlib | Create publication-quality charts in Python |
| networkx | For creating and manipulating complex networks |
| numpy | Provides array processing for numbers, strings, records, and objects |
pandas |
Used for data cleaning |
| pillow | Adds support for opening, manipulating, and saving image files in various formats |
| pytables | Combines Python, HDF5 library, and NumPy to handle large amounts of data |
| pytorch | Deep learning using GPU and CPU |
| pywavelet | Wavelet transform package |
| scikit-learn | A set of Python packages for machine learning and data mining |
| scipy | Scientific computing package for Python |
| seaborn | Statistical data visualization package |
| snowballstemmer | A collection of stemming algorithms in Python |
| statsmodels | Professional statistical analysis and modeling |
| sympy | For symbolic computation |
| tabulate | Package for creating tables and formatting them |
Section 3.1 explained that when using third-party packages in Excel’s built-in Python, they must first be imported, using the format:
import third_party_package_name as alias
Or you can directly import subpackages or functions from a third-party package, or import everything:
from third_party_package_name import * # Import all
from third_party_package_name import submodule
from third_party_package_name import function
Packages Imported by Default in Excel’s Built-in Python
In Subsection 3.1.1, when introducing the initialization settings of Excel’s built-in Python, it was mentioned that upon initialization, the following packages are already imported: Matplotlib.pyplot submodule, NumPy, pandas, Seaborn, and statsmodels, i.e.:
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
import statsmodels as sm
Therefore, when using these packages in Excel’s built-in Python, there is no need to import them again — you can use their aliases directly, as shown in the examples in Sections 3.1.3 and 3.1.4.